package cn.edu.lcu.cs.javalearning.dao;

import java.util.List;

import cn.edu.lcu.cs.javalearning.model.Teacher;

public class TeacherDaoImpl extends BaseDaoImpl<Teacher, Long> implements TeacherDao {

	public TeacherDaoImpl() {
		super(Teacher.class);
	}

	@Override
	public List<Teacher> findByTeacherNo(String teacherNo) {
		Teacher teacher = new Teacher();
		teacher.setTeacherNo(teacherNo);
		return findByExample(teacher);
	}

	@Override
	public List<Teacher> findByTeacherName(String teacherName) {
		String sql = "select * from teacher where teacher_name = ?";
		return query(sql, teacherName);
	}

}
